<!DOCTYPE html>
<html>

	<head>
		<title>深圳市消消乐有害生物防治有限公司-在线留言</title>
		<meta charset="UTF-8" />
		<script type="text/javascript" src="js/swiper.min.js"></script>
		<link rel="stylesheet" href="css/swiper.min.css" />
		<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
		<script src="js/xs.js"></script>
		<script type="text/javascript" src="js/global.js"></script>

		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/style.css" />
	</head>

	<body>
		<div class="container bg-white">
			<div id="head"></div>
			<div class="banner row">
				<div>
					<img src="img/msg_banner.jpg" width="100%" />
				</div>
			</div>

			<div class="row" style="margin-top: 20px;">
				<div class="col-sm-3 col-xs-12 p-0">
					<div class="card">
						<div class="cardHead">
							<div class="float-left">
								<img class="float-left" src="img/zxq3.jpg" / style="margin-top: 7px;margin-right: 3px;">
								<div class="titleIco float-left">在线留言</div>
							</div>
						</div>
						<div class="cardBody">
							<ul id="navList" class="list-group list-group-flush p-3 text-center">
								<li class="list-group-item">
									<a href="#">在线留言</a>
								</li>
							</ul>
						</div>
					</div>
					<div class="card" style="margin-top: 15px;">
						<div class="cardHead">
							<div class="float-left">
								<img class="float-left" src="img/zxq3.jpg" / style="margin-top: 7px;margin-right: 3px;">
								<div class="titleIco float-left">联系我们</div>
							</div>
						</div>
					<div id="contact2" class="cardBody p-3 c666" style="background: url(img/20130530101646794679.jpg) right bottom no-repeat;min-height: 200px;line-height: 25px;">
					</div>
					</div>
				</div>

				<div class="col-sm-9 col-xs-12 p-0">
					<div class="card" style="margin-left: 20px;">
						<div class="cardHead">
							<div class="float-left">
								<img class="float-left" src="img/zxq3.jpg" / style="margin-top: 7px;margin-right: 3px;">
								<div class="titleIco float-left">在线留言</div>
							</div>
						</div>
						<div class="cardBody container-fluid p-3" id="projectList">
							<form class="col-13 offset-1" style="margin-top: 50px;margin-bottom: 50px;">
								<div class="form-group row">
									<label class="col-sm-3">姓名:</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" placeholder="请输入姓名" id="name">
									</div>
								</div>
								<div class="form-group row">
									<label class="col-sm-3" for="exampleInputEmail1">联系电话:</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" placeholder="请输入姓名" id="phone">
									</div>
								</div>
								<div class="form-group row">
									<label class="col-sm-3" for="exampleInputEmail1">留言内容:</label>
									<div class="col-sm-10">
										<textarea placeholder="请输入内容" rows="4" class="form-control" id="content1"></textarea>
									</div>
								</div>
								<div class="form-group row">
									<label class="col-sm-3" for="exampleInputEmail1"></label>
									<div class="col-sm-10">
										<button type="submit" class="btn btn-primary" id="submit">提交留言</button>
									</div>
								</div>

							</form>
						</div>

					</div>
				</div>
			<div id="foot"></div>
			</div>

			<div class="scrollsidebar" id="scrollsidebar"></div>
		</div>
		<script>
			$("#submit").click(function(e) {
				e.preventDefault();
				var name = $("#name").val()
				var phone = $("#phone").val()
				var content = $("#content1").val()
				if(name == "") {
					alert("请填写姓名！")
					return
				}
				if(phone == "") {
					alert("请填写联系方式！")
					return
				}
				$.ajax({
					type: "POST",
					async: false,
					url: baseURL + "message/saveLeaveMessage.do",
					data: {
						name: name,
						phone: phone,
						content: content
					},
					dataType: "json",
					success: function(res) {
						alert("恭喜！您的留言已提交")
					}
				});
			})
		</script>
	</body>

</html>